package com.eastcom.providor.service.impl;

import java.util.List;

import com.eastcom.bm.atom.Atom_ActionEmailNotice;
import com.eastcom.providor.dao.IEmailNoticeDao;
import com.eastcom.providor.service.BaseService;
import com.eastcom.providor.service.IEmailNoticeService;

public class EmailNoticeService extends BaseService implements IEmailNoticeService {

	private IEmailNoticeDao emailNoticeDao;

	public void setEmailNoticeDao(IEmailNoticeDao emailNoticeDao) {
		this.emailNoticeDao = emailNoticeDao;
	}
	
	public Atom_ActionEmailNotice findEmailNoticeByUUID(String uuid) {
		try {
			return emailNoticeDao.findEmailNoticeByUUID(uuid);
		} 
		catch (Exception e) {
			log.error("EmailNoticeService findEmailNoticeByUUID error", e);
			e.printStackTrace();
		}
		return null;
	}

	public List<Atom_ActionEmailNotice> getAllEmailNotice() {
		try {
			return emailNoticeDao.getAllEmailNotice();
		} 
		catch (Exception e) {
			log.error("EmailNoticeService getAllEmailNotice error", e);
			e.printStackTrace();
		}
		return null;
	}

	public boolean deleteByUUID(String uuid) {
		try {
			 emailNoticeDao.deleteByUUID(uuid);
			 return true;
		} 
		catch (Exception e) {
			log.error("EmailNoticeService deleteByUUID error", e);
			e.printStackTrace();
		}
		return false;
	}

}
